<?php echo $this->Html->script('JqueryDonation'); ?>
<div class="donations index">
	<h2><?php echo __('Donations'); ?></h2>
	<table cellpadding="0" cellspacing="0" id="donation" class="search">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('contact'); ?></th>
			<th><?php echo $this->Paginator->sort('date'); ?></th>
			<th><?php echo $this->Paginator->sort('description'); ?></th>
			<th><?php echo $this->Paginator->sort('amount'); ?></th>
			<th><?php echo $this->Paginator->sort('payment_method'); ?></th>
			<th><?php echo $this->Paginator->sort('is_monthly'); ?></th>
			<th><?php echo $this->Paginator->sort('extra_info'); ?></th>
			<th><?php echo $this->Paginator->sort('special_msg'); ?></th>
	</tr>
	</thead>
         	<tbody>
         	<?php
                         if (!empty($donations)){
                             foreach ($donations as $donation):
                         ?>

	<tr>
		<td>
			<?php echo $this->Html->link($donation['Contact']['id'], array('controller' => 'contacts', 'action' => 'view', $donation['Contact']['id'])); ?>
		</td>
		<td><?php echo $this->Html->link($donation['Donation']['date'], array('controller' => 'donations', 'action' => 'view', $donation['Donation']['id'])); ?></td>
		<td><?php echo h($donation['Donation']['donation_desc']); ?>&nbsp;</td>
		<td><?php echo h($donation['Donation']['amount']); ?>&nbsp;</td>
		<td><?php echo h($donation['Donation']['payment_method']); ?>&nbsp;</td>
		<td><?php echo h($donation['Donation']['is_monthly']); ?>&nbsp;</td>
		<td><?php echo h($donation['Donation']['extra_info']); ?>&nbsp;</td>
		<td><?php echo h($donation['Donation']['special_msg']); ?>&nbsp;</td>
	</tr>
    <?php
                                endforeach;
                            }else{
                            ?>
                            <tr>
                                <td>No Data Found</td>
                            </tr>
                            <?php }?>
	</tbody>
    </table>

	<p>

                	<div class="addbuttons" >
					<ul>
						<li><?php echo $this->Html->link(__('New Donation'), array('controller' => 'donations', 'action' => 'add')); ?> </li>
					</ul>
					</div>
        	<p>

	<p>
</div>
